<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改银行账单管理')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: select2-css" />
    <th:block th:include="include :: bootstrap-select-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-management-edit" th:object="${ytBillManagement}">
            <input name="billId" th:field="*{billId}" type="hidden">
            <input name="customerId" th:field="*{customerId}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">客户名字：</label>
                <div class="col-sm-8">
                    <select class="form-control" th:field="*{customerId}" name="params[name]" th:with="customer=${@CustomerMsgService.selectYtCustomerMsgList(null) }">
                        <option th:each="c : ${customer}" th:text="${c.name}" th:value="${c.customerId}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">账号：</label>
                <div class="col-sm-8">
                    <input name="account" th:field="*{account}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">账号名称：</label>
                <div class="col-sm-8">
                    <input name="accountName" th:field="*{accountName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">借方发生金额：</label>
                <div class="col-sm-8">
                    <input name="borrowMoney" th:field="*{borrowMoney}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">贷方发生金额：</label>
                <div class="col-sm-8">
                    <input name="amountMoney" th:field="*{amountMoney}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">余额：</label>
                <div class="col-sm-8">
                    <input name="balance" th:field="*{balance}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">币种：</label>
                <div class="col-sm-8">
                    <select name="currency" class="form-control m-b" th:with="type=${@dict.getType('sys_currency')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{currency}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">对方户名：</label>
                <div class="col-sm-8">
                    <input name="reciprocalAccountName" th:field="*{reciprocalAccountName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">对方账号：</label>
                <div class="col-sm-8">
                    <input name="reciprocalAccountNumber" th:field="*{reciprocalAccountNumber}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">对方开户机构：</label>
                <div class="col-sm-8">
                    <input name="accountOpening" th:field="*{accountOpening}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">记账日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="accountingDate" th:value="${#dates.format(ytBillManagement.accountingDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">摘要：</label>
                <div class="col-sm-8">
                    <input name="summary" th:field="*{summary}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="remark" class="form-control">[[*{remark}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">交易流水号：</label>
                <div class="col-sm-8">
                    <input name="transactionNumber" th:field="*{transactionNumber}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">企业流水号：</label>
                <div class="col-sm-8">
                    <input name="enterpriseNumber" th:field="*{enterpriseNumber}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">凭证种类：</label>
                <div class="col-sm-8">
                    <select name="voucheKind" class="form-control m-b" th:with="type=${@dict.getType('sys_vouche_kind')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{voucheKind}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">凭证号：</label>
                <div class="col-sm-8">
                    <input name="voucherNumber" th:field="*{voucherNumber}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">个性化信息：</label>
                <div class="col-sm-8">
                    <input name="indivduation" th:field="*{indivduation}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <th:block th:include="include :: select2-js" />
    <th:block th:include="include :: bootstrap-select-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/management";
        $("#form-management-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-management-edit').serialize());
            }
        }

        $("input[name='accountingDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>
